#ifndef TREE_H
#define TREE_H
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include "token.h"


typedef struct node {
	int numchild;           // number of children
	char *text;             // important text
	struct node **children; // pointer to list of children nodes
	struct token *leaf;     // pointer to leaf node (lex token)
} node;


node* tree;

node* createnode(char *text, struct token *tok, int nkids, ...);
void printT(node* head, int height);
void printtree(node* head, int height);

#endif

